<template>
  <div class="beauty">
    <input type="text" :value="value" @input="demo">
  </div>
</template>

<script>
  export default {
    name:'BeautyInput',
    props:['value'],
    methods: {
      demo(event){
        this.$emit('input',event.target.value)
      }
    },
  }
</script>

<style lang="less" scoped>
  .beauty {
    padding: 10px;
    background-color: skyblue;
    border-radius: 10px;
    box-shadow: 0 0 10px black;
    input{
      width: 200px;
      height: 30px;
      background-image: linear-gradient(45deg,red,yellow,green);
    }
  }
</style>